-
Notifications
You must be signed in to change notification settings - Fork 160
Support for cypher directive in relationship properties #6903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: f49033b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Performance ReportNo Performance Changes Show Full Table
Old Schema Generation: 21.542s |
MacondoExpress
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, left some comments,
can you also verifies that the https://neo4j.com/docs/graphql/current/directives/schema-configuration/field-configuration/#_selectable @selectable. @filterable, @settable are working as expected?
| "@neo4j/graphql": patch | ||
| --- | ||
|
|
||
| Add support for `@cypher` directive in relationship properties |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small snippet such as:
type ActedIn @relationshipProperties {
screenTimeHours: Float
@cypher(
statement: """
RETURN this.screenTimeMinutes / 60 AS c
"""
columnName: "c"
)
screenTimeMinutes: Int
}Could give a better idea to the reader about what this changes is about!
| }, | ||
| {} | ||
| ); | ||
| const cypherSortFieldsEdgeFlagMap = sortEdgeFields.reduce<Record<string, boolean>>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could avoid having duplicate code in this file between Node and Edge fields, to give more visibility (if needed) when these have to behave differently
| }); | ||
| }); | ||
|
|
||
| test("top-level union", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong test title
Added schema tests for selectable and selectable. Settable is no-op on cypher directives |
4d5981b to
f49033b
Compare
Description
Support for using
@cypherdirectives in relationship propertiesThe following will not be supported:
@cypherfields (both, in edge and node)Example: